///项目进度总览
<template>
    <div>
        <span>月度计划进度总览</span>
        <BarChart :chartWidth="chartWidth" :chartHeight="chartHeight" />
    </div>
</template>

<script lang="ts" setup>
import BarChart from '../../Common/Echarts/BarChart.vue';
import { ref, defineProps } from 'vue';

let chartHeight = ref(200); // 默认高度
let chartWidth = ref(200); // 默认宽度
let receivedProps = defineProps<{
    chartHeight: number;
    chartWidth: number;
}>();

if (receivedProps.chartHeight) {
    chartHeight.value = receivedProps.chartHeight - 20 - 20; //20是div继承自el-main中的上下两个padding值-标题高度
}
if (receivedProps.chartWidth) {
    chartWidth.value = receivedProps.chartWidth;
}
</script>